//
//  VGIMOCInputView.h
//  IMTest
//
//  Created by 宋海胜 on 2019/4/22.
//  Copyright © 2019年 宋海胜. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NIMInputProtocol.h"
#import "NIMSessionConfig.h"
#import "VGIMOCInputToolBar.h"
#import "NIMInputToolBar.h"
#import "NIMInputAtCache.h"

@class NIMInputMoreContainerView;
@class NIMInputEmoticonContainerView;


@protocol VGIMOCInputViewDelegate <NSObject>

@optional

- (void)didChangeInputHeight:(CGFloat)inputHeight;

- (void)tapItem:(NSInteger)index;

@end

@interface VGIMOCInputView : UIView

@property (nonatomic, strong) NIMSession             *session;

@property (nonatomic, assign) NSInteger              maxTextLength;

@property (assign, nonatomic, getter=isRecording)    BOOL recording;

@property (strong, nonatomic)  VGIMOCInputToolBar *toolBar;
@property (strong, nonatomic)  UIView *moreContainer;
@property (strong, nonatomic)  UIView *emoticonContainer;

@property (nonatomic, assign) NIMInputStatus status;
@property (nonatomic, strong) NIMInputAtCache *atCache;
@property (nonatomic, weak) UIViewController * vc;

- (instancetype)initWithFrame:(CGRect)frame
                       config:(id<NIMSessionConfig>)config;

- (void)reset;

- (void)refreshStatus:(NIMInputStatus)status;

- (void)setInputDelegate:(id<VGIMOCInputViewDelegate>)delegate;

//外部设置
- (void)setInputActionDelegate:(id<NIMInputActionDelegate>)actionDelegate;

- (void)setInputTextPlaceHolder:(NSString*)placeHolder;
- (void)updateAudioRecordTime:(NSTimeInterval)time;
- (void)updateVoicePower:(float)power;

@end
